<div class="modal-header">
    <h3 class="modal-title">用户&角色信息</h3>
</div>
<div class="modal-body">
    <form class="form-horizontal">
        <div class="form-group">
            <label class="col-lg-4 control-label"><span style="color: #ec2121;">*</span>用户名称</label>
            <div class="col-lg-8">
                <input type="text" class="form-control" placeholder="用户名称" ng-model="user.username">
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg-4 control-label">角色名称</label>
            <div class="col-lg-8">
                <ui-select ng-model="role.selected" theme="bootstrap">
                    <ui-select-match placeholder="搜索角色名称......">{{$select.selected.roleName}}</ui-select-match>
                    <ui-select-choices refresh="queryRole($select.search)" refresh-dalay="0" repeat="item in roleList | filter: $select.search">
                        <div ng-bind-html="item.roleName | highlight: $select.search"></div>
                    </ui-select-choices>
                </ui-select>
            </div>
        </div>
        <div class="form-group" style="text-align: center;">
            <button ng-click="saveData()"
                    class="btn btn-xs"
                    style="margin-left: 5px; background-color: #2e6da4; color: white;">
                <span class="glyphicon glyphicon-edit"></span>保存</button>

            <button ng-click="closeModal()"
                    class="btn btn-xs"
                    style="margin-left: 5px; background-color: red; color: white;">
                <span class="glyphicon glyphicon-remove"></span>关闭</button>
            <!--<button class="btn btn-primary btn-sm" ng-click="saveData()">保存</button>-->
            <!--<button class="btn btn-default btn-sm" ng-click="closeModal()" style="margin-left: 20px;">关闭</button>-->
        </div>
    </form>
    <div ng-if="alert.type != ''">
        <div uib-alert ng-class="'alert-' + alert.type" close="closeAlert()">{{alert.msg}}</div>
    </div>
</div>